import service from '@/utils/request'

// @Tags MaterialPrepareDocument
// @Summary 创建备料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MaterialPrepareDocument true "创建备料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /materialPrepareDocument/createMaterialPrepareDocument [post]
export const createMaterialPrepareDocument = (data) => {
  return service({
    url: '/materialPrepareDocument/createMaterialPrepareDocument',
    method: 'post',
    data
  })
}

// @Tags MaterialPrepareDocument
// @Summary 删除备料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MaterialPrepareDocument true "删除备料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /materialPrepareDocument/deleteMaterialPrepareDocument [delete]
export const deleteMaterialPrepareDocument = (params) => {
  return service({
    url: '/materialPrepareDocument/deleteMaterialPrepareDocument',
    method: 'delete',
    params
  })
}

// @Tags MaterialPrepareDocument
// @Summary 批量删除备料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除备料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /materialPrepareDocument/deleteMaterialPrepareDocument [delete]
export const deleteMaterialPrepareDocumentByIds = (params) => {
  return service({
    url: '/materialPrepareDocument/deleteMaterialPrepareDocumentByIds',
    method: 'delete',
    params
  })
}

// @Tags MaterialPrepareDocument
// @Summary 更新备料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MaterialPrepareDocument true "更新备料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /materialPrepareDocument/updateMaterialPrepareDocument [put]
export const updateMaterialPrepareDocument = (data) => {
  return service({
    url: '/materialPrepareDocument/updateMaterialPrepareDocument',
    method: 'put',
    data
  })
}

// @Tags MaterialPrepareDocument
// @Summary 用id查询备料
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.MaterialPrepareDocument true "用id查询备料"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /materialPrepareDocument/findMaterialPrepareDocument [get]
export const findMaterialPrepareDocument = (params) => {
  return service({
    url: '/materialPrepareDocument/findMaterialPrepareDocument',
    method: 'get',
    params
  })
}

// @Tags MaterialPrepareDocument
// @Summary 分页获取备料列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取备料列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /materialPrepareDocument/getMaterialPrepareDocumentList [get]
export const getMaterialPrepareDocumentList = (params) => {
  return service({
    url: '/materialPrepareDocument/getMaterialPrepareDocumentList',
    method: 'get',
    params
  })
}
